﻿import com.customine.api.ICustomDesign;
import com.customine.api.ICustomProduct;
import com.customine.api.IProduct;
import com.customine.api.IProductPrice;
import com.customine.api.ITshirt;
import com.customine.design.TShirtBase;

/**
 * @author Colin Leung
 */
class com.customine.shop.TshirtCustomize implements ICustomProduct, IProduct, IProductPrice,ITshirt {
	private var color : Number;
	private var size : String;
	private var gender : String;
	private var sku : String;
	private var price : Number;
	private var customDesign : ICustomDesign;
	private var style:String;
	private static var designID:Number = 0;
	private var availableTShirtBase : TShirtBase;

	public function TshirtCustomize(sku:String,price:Number,size:String,color:Number,gender:String,customDesign:ICustomDesign){
		this.sku = sku;//SKU format , cutting-color-size-pattern;
		this.price = price;
		this.size = size;
		this.color = color;
		this.gender = gender;
		setCustomDesign(customDesign);
	}

	public function getSKU() : String {
		return sku;
	}

	public function getPrice() : Number {
		return price;
	}

	public function getGender() : String {
		return gender;
	}

	public function getSize() : String {
		return size;
	}

	public function getColor() : Number {
		return color;
	}

	public function setCustomDesign(customDesign : ICustomDesign) : Void {
		sku = sku+"-"+designID;
		this.customDesign = customDesign;
	}

	public function getCustomDesign() : ICustomDesign {
		return customDesign;
	}
	
	public function setPrice(price : Number) : Void {
		this.price = price;
	}

	public function getStyle() : String {
		return style;
	}

}